import Mock from 'mockjs'
import url from 'url'

//生成电力消耗的数据
const {EleList} = Mock.mock({
    'EleList': [
        {
            day_ele:'2',
            month_ele:'2000',
            year_ele:'3000',
            avg_ele:'2',
            people_ele:'2000'
        }
    ]
})

//生成水力消耗的数据
const {WaterList} = Mock.mock({
    'WaterList': [
        {
            day_water:'22',
            month_water:'200340',
            year_water:'30004',
            avg_water:'24',
            people_water:'22000'
        }
    ]
})


//电力
Mock.mock('/api/module1/eleMsg','get',()=>{
    return {
        status: 200,
        message: '获取电力消耗信息成功',
        list: EleList,
    }
})


//水力
Mock.mock('/api/module1/WaterMsg','get',()=>{
    return {
        status: 200,
        message: '获取水力消耗信息成功',
        list: WaterList,
    }
})
